Entity Weapon
Weapon is the Entity definition for a weapon.
Subclass of Collectable.
Functions
GetEquippedAmmo () | GetEquippedAmmo returns the ammo object loaded into this weapon. |
GetMagCapacity () | GetMagCapacity returns the maximum rounds the weapon can hold. |
GetMinBaseDamage () | GetMinBaseDamage returns the minimum base damage for the weapon. |
GetMaxBaseDamage () | GetMaxBaseDamage returns the maximum base damage for the weapon. |
GetSelectedModeID () | GetSelectedModeID returns the ID of the currently selected mode. |
GetDamageRadius () | GetDamageRadius returns the default damage radius for the weapon. |
IsCalledShot () | IsCalledShot returns true if the weapon is set to use an aimed shot. |
DestroyUser () | DestroyUser returns true if the weapon destroys the using Actor. |
GetProjectileSprite () | GetProjectileSprite returns the name of the projectile sprite. |
GetAmmoType () | GetAmmoType returns the base ammo type of the weapon ("9mm" for example). |
GetDefaultAmmoVariant () | GetDefaultAmmoVariant returns the ammo variant ("JHP" for example) to use for non-ammo weapons. |
GetWeaponPerk () | GetWeaponPerk returns any active weapon perk (currently only "None" or "Night Scope"). |
GetPrimaryDamageType () | GetPrimaryDamageType returns the primary damage type for a non-ammo weapon. |
GetSecondaryDamageType () | GetSecondaryDamageType returns the secondary effect type for a non-ammo weapon. |
GetSoundType () | GetSoundType returns the sound type for the weapon. |
GetMode (num) | GetMode returns the given numbered mode for the weapon. |
GetCurrentMode () | GetCurrentMode returns the current mode for the weapon. |
Functions
- GetEquippedAmmo ()
-
GetEquippedAmmo returns the ammo object loaded into this weapon.
Returns:
- GetMagCapacity ()
-
GetMagCapacity returns the maximum rounds the weapon can hold.
Returns:
-
An integer indicating the weapon magazine capacity.
- GetMinBaseDamage ()
-
GetMinBaseDamage returns the minimum base damage for the weapon.
Returns:
-
An integer indicating the weapon minimum damage.
- GetMaxBaseDamage ()
-
GetMaxBaseDamage returns the maximum base damage for the weapon.
Returns:
-
An integer indicating the weapon maximum damage.
- GetSelectedModeID ()
-
GetSelectedModeID returns the ID of the currently selected mode.
Returns:
-
An integer indicating the weapon mode ID.
- GetDamageRadius ()
-
GetDamageRadius returns the default damage radius for the weapon.
Returns:
-
A numeric value indicating the weapon damage radius.
- IsCalledShot ()
-
IsCalledShot returns true if the weapon is set to use an aimed shot.
Returns:
-
A boolean value indicating the weapon is set to aimed shot.
- DestroyUser ()
-
DestroyUser returns true if the weapon destroys the using Actor.
Returns:
-
A boolean value indicating the weapon kills its user.
- GetProjectileSprite ()
-
GetProjectileSprite returns the name of the projectile sprite.
Returns:
-
A string indicating the projectile sprite file name.
- GetAmmoType ()
-
GetAmmoType returns the base ammo type of the weapon ("9mm" for example).
Returns:
-
A string indicating the weapon's ammo type.
- GetDefaultAmmoVariant ()
-
GetDefaultAmmoVariant returns the ammo variant ("JHP" for example) to use for non-ammo weapons.
Returns:
-
A string indicating the weapon's default ammo variant.
- GetWeaponPerk ()
-
GetWeaponPerk returns any active weapon perk (currently only "None" or "Night Scope").
Returns:
-
A string indicating the weapon's special perk.
- GetPrimaryDamageType ()
-
GetPrimaryDamageType returns the primary damage type for a non-ammo weapon.
Returns:
-
A string indicating the weapon's damage type (e.g. "energy").
- GetSecondaryDamageType ()
-
GetSecondaryDamageType returns the secondary effect type for a non-ammo weapon.
Returns:
-
A string indicating the weapon's secondary effect type (e.g. "knockdown").
- GetSoundType ()
-
GetSoundType returns the sound type for the weapon.
Returns:
-
A string indicating the weapon's sound type.
- GetMode (num)
-
GetMode returns the given numbered mode for the weapon.
Parameters:
- num The weapon mode to retrieve.
Returns:
-
A WeaponMode object for that mode.
- GetCurrentMode ()
-
GetCurrentMode returns the current mode for the weapon.
Returns:
-
A WeaponMode object for the current mode.